﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.Entities.BPM_Business.CommonReportConfigs
{
    /// <summary>
    /// 字段基本属性配置表
    /// </summary>
    public class CommonReportField : CommonReportBase
    {
        /// <summary>
        /// 数据库名称
        /// </summary>
        public string TABLE_SCHEMA { get; set; }

        /// <summary>
        /// 表名称
        /// </summary>
        public string TABLE_NAME { get; set; }

        /// <summary>
        /// 字段位置
        /// </summary>
        public int ORDINAL_POSITION { get; set; }

        /// <summary>
        /// 字段名称
        /// </summary>
        public string COLUMN_NAME { get; set; }

        /// <summary>
        /// 字段类型
        /// </summary>
        public string DATA_TYPE { get; set; }

        /// <summary>
        /// 是否可以NULL YES/NO
        /// </summary>
        public string IS_NULLABLE { get; set; }

        /// <summary>
        /// 字段默认值
        /// </summary>
        public string COLUMN_DEFAULT { get; set; }

        /// <summary>
        /// 字符串最大值
        /// </summary>
        public string CHARACTER_MAXIMUM_LENGTH { get; set; }

        /// <summary>
        /// 数值精度
        /// </summary>
        public string NUMERIC_PRECISION { get; set; }

        /// <summary>
        /// 数值精度，小数点
        /// </summary>
        public string NUMERIC_SCALE { get; set; }

        /// <summary>
        /// 日期精度
        /// </summary>
        public string DATETIME_PRECISION { get; set; }

        /// <summary>
        /// 字段类型，包含数值精度varchar(255) decimal(16,2)
        /// </summary>
        public string COLUMN_TYPE { get; set; }


        /// <summary>
        /// 主键 PRI
        /// </summary>
        public string COLUMN_KEY { get; set; }

        public string EXTRA { get; set; }

        /// <summary>
        /// 字段描述
        /// </summary>
        public string COLUMN_COMMENT { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string FieldDesc { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int ShowIndex { get; set; } = 0;

        /// <summary>
        /// 输入框样式 字段类型 text=文本型，date=日期类型，用于设置搜索框，select-single=下拉框 单选，select-multiple 下拉框多选
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string InputBoxType { get; set; }

        /// <summary>
        /// 下拉框选项（Json）、日期格式
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ShortSelectItemJson { get; set; }

        /// <summary>
        /// 校验类型 1 唯一
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int? CheckType { get; set; }

        /// <summary>
        /// 校验
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string RegexContent { get; set; }

        /// <summary>
        /// 校验失败提示信息
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string CheckFailMessage { get; set; }

        /// <summary>
        /// 默认值类型 1.当前时间 2.当前用户Id 3.当前用户工号 4.当前用户名 5.Guid 1000.自定义
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int? DefaultType { get; set; }

        /// <summary>
        /// 自定义默认值
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string DefaultValue { get; set; }
    }
}
